-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/dpp 90 #144
Feature/dpp 90 #144
Conversation
…dv4 to enablePostgresUuidExtension
…Runner as the main param
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #144 +/- ##
============================================
- Coverage 45.89% 34.04% -11.85%
============================================
Files 65 139 +74
Lines 2412 6820 +4408
Branches 539 1615 +1076
============================================
+ Hits 1107 2322 +1215
- Misses 1305 4497 +3192
- Partials 0 1 +1 ☔ View full report in Codecov by Sentry. |
* It should accept queryRunner from the typeorm | ||
*/ | ||
export const enablePostgresUuidExtension = async (queryRunner: any) => { | ||
if (!queryRunner.query) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting choice. Why not simply expose query with an any in the type for querunner and have TS handle this for you. It means that at compile time you cannot pas in an object without a query param, so you do not have to check at runtime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modified this to have a type which has query function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update tsconfig
…ry function to enablePostgresUuidExtension signature
@@ -2,19 +2,18 @@ export const flattenArray = <T>(args: { items: Array<T | Array<T>> }): Array<T> | |||
|
|||
export const flattenMigrations = <T>(args: { migrations: Array<T | Array<T>> }): Array<T> => args.migrations.flat() as Array<T> | |||
|
|||
/** | |||
* It should accept queryRunner from the typeorm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay an now add the remark back to the type please, so people know you are creating a type that mimics TypeOrm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
…nsion in ssi-sdk.core
added the ssi-sdk.core function for
enablePostgresUuidExtension
and exported it. also made data-store use it